package com.bridgeQQ.client.control.commands.uiinteracte
{
	import com.bridgeQQ.client.constant.MsgCont;
	import com.bridgeQQ.client.control.ApplicationController;
	import com.bridgeQQ.client.control.MessageManager;
	import com.bridgeQQ.client.control.commands.BaseRespond;
	import com.bridgeQQ.client.core.ICommand;
	import com.bridgeQQ.client.model.BridgeModel;
	import com.bridgeQQ.client.vo.User;
	
	public class OpenBridgeMsgWindowCommand extends BaseRespond implements ICommand
	{
		public function OpenBridgeMsgWindowCommand(info:Object, target:Object, ...params)
		{
			super(info, target);
			this.params = params;
		}
		
		public override function execute():void
		{
			var user:User = info.friend;
			var self:String = BridgeModel.instance.user.email;
			var topic:String = self + new Date().time;
			var mm:MessageManager = ApplicationController.controller.getSubController("messageManager");
			mm.openMsgWindow(topic, MsgCont.MSG_TYPE_BRIDGE, [self, user.email]);
		}
	}
}